<?php
include ('dbTest.php');
    $family = json_decode(getFamily());
?>
<html>
<head>
    <title>Test Again</title>
    <script src="js/jquery-1.11.1.min.js"></script>
    <script src="js/search.js"></script>
</head>
<body>
    <br/>
    <table>
        <thead>
            <td>ID</td>
            <td>First Name</td>
            <td>Last Name</td>
            <td>Nick Name</td>
            <td>Age</td>
        </thead>
        <tr>
            <td>&nbsp;</td>
            <td><input type="text" class="search" data-selector="tr" data-target="fName"></td>
            <td><input type="text" class="search" data-selector="tr" data-target="lName"></td>
            <td><input type="text" class="search" data-selector="tr" data-target="nickName"></td>
            <td>&nbsp;</td>
        </tr>
        <?php
        foreach($family as $value)
        {
            echo "
            <tr>
                <td>".$value->id."</td>
                <td class=\"fName\">".$value->firstName."</td>
                <td class=\"lName\">".$value->lastName."</td>
                <td class=\"nickName\">".$value->nickName."</td>
                <td>".$value->age."</td>
            </tr>
            ";
        }
        ?>
    </table>
</body>
</html>